
/**
 * This is a generated class and is not intended for modification.  
 */
package com.model.valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _VOInvoiceMasterEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("folderd", "catagory_id", "catagory", "return_flag", "tax2", "tax1", "location", "exp_type_id", "customer", "project_code_id", "tax3", "billable", "amount", "bill_paid", "split_flag", "user_id", "additional_tax", "vendor", "modify_date", "category_id", "vendor_id", "tax_claim", "location_id", "folder", "tax_catagory", "folder_id", "category", "company_paid", "isSelected", "tran_date", "entry_date", "invoice_no", "user", "payment_type", "customer_id", "payment_type_id");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("folderd", "catagory_id", "catagory", "return_flag", "tax2", "tax1", "location", "exp_type_id", "customer", "project_code_id", "tax3", "billable", "amount", "bill_paid", "split_flag", "user_id", "additional_tax", "vendor", "modify_date", "category_id", "vendor_id", "tax_claim", "location_id", "folder", "tax_catagory", "folder_id", "category", "company_paid", "isSelected", "tran_date", "entry_date", "invoice_no", "user", "payment_type", "customer_id", "payment_type_id");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("folderd", "catagory_id", "catagory", "return_flag", "tax2", "tax1", "location", "exp_type_id", "customer", "project_code_id", "tax3", "billable", "amount", "bill_paid", "split_flag", "user_id", "additional_tax", "vendor", "modify_date", "category_id", "vendor_id", "tax_claim", "location_id", "folder", "tax_catagory", "folder_id", "category", "company_paid", "isSelected", "tran_date", "entry_date", "invoice_no", "user", "payment_type", "customer_id", "payment_type_id");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("folderd", "catagory_id", "catagory", "return_flag", "tax2", "tax1", "location", "exp_type_id", "customer", "project_code_id", "tax3", "billable", "amount", "bill_paid", "split_flag", "user_id", "additional_tax", "vendor", "modify_date", "category_id", "vendor_id", "tax_claim", "location_id", "folder", "tax_catagory", "folder_id", "category", "company_paid", "isSelected", "tran_date", "entry_date", "invoice_no", "user", "payment_type", "customer_id", "payment_type_id");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "VOInvoiceMaster";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();

    
    model_internal var _folderdIsValid:Boolean;
    model_internal var _folderdValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _folderdIsValidCacheInitialized:Boolean = false;
    model_internal var _folderdValidationFailureMessages:Array;
    
    model_internal var _catagory_idIsValid:Boolean;
    model_internal var _catagory_idValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _catagory_idIsValidCacheInitialized:Boolean = false;
    model_internal var _catagory_idValidationFailureMessages:Array;
    
    model_internal var _catagoryIsValid:Boolean;
    model_internal var _catagoryValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _catagoryIsValidCacheInitialized:Boolean = false;
    model_internal var _catagoryValidationFailureMessages:Array;
    
    model_internal var _locationIsValid:Boolean;
    model_internal var _locationValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _locationIsValidCacheInitialized:Boolean = false;
    model_internal var _locationValidationFailureMessages:Array;
    
    model_internal var _customerIsValid:Boolean;
    model_internal var _customerValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _customerIsValidCacheInitialized:Boolean = false;
    model_internal var _customerValidationFailureMessages:Array;
    
    model_internal var _vendorIsValid:Boolean;
    model_internal var _vendorValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _vendorIsValidCacheInitialized:Boolean = false;
    model_internal var _vendorValidationFailureMessages:Array;
    
    model_internal var _modify_dateIsValid:Boolean;
    model_internal var _modify_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _modify_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _modify_dateValidationFailureMessages:Array;
    
    model_internal var _folderIsValid:Boolean;
    model_internal var _folderValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _folderIsValidCacheInitialized:Boolean = false;
    model_internal var _folderValidationFailureMessages:Array;
    
    model_internal var _categoryIsValid:Boolean;
    model_internal var _categoryValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _categoryIsValidCacheInitialized:Boolean = false;
    model_internal var _categoryValidationFailureMessages:Array;
    
    model_internal var _tran_dateIsValid:Boolean;
    model_internal var _tran_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _tran_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _tran_dateValidationFailureMessages:Array;
    
    model_internal var _entry_dateIsValid:Boolean;
    model_internal var _entry_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _entry_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _entry_dateValidationFailureMessages:Array;
    
    model_internal var _userIsValid:Boolean;
    model_internal var _userValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _userIsValidCacheInitialized:Boolean = false;
    model_internal var _userValidationFailureMessages:Array;
    
    model_internal var _payment_typeIsValid:Boolean;
    model_internal var _payment_typeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _payment_typeIsValidCacheInitialized:Boolean = false;
    model_internal var _payment_typeValidationFailureMessages:Array;

    model_internal var _instance:_Super_VOInvoiceMaster;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _VOInvoiceMasterEntityMetadata(value : _Super_VOInvoiceMaster)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // depenents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["folderd"] = new Array();
            model_internal::dependentsOnMap["catagory_id"] = new Array();
            model_internal::dependentsOnMap["catagory"] = new Array();
            model_internal::dependentsOnMap["return_flag"] = new Array();
            model_internal::dependentsOnMap["tax2"] = new Array();
            model_internal::dependentsOnMap["tax1"] = new Array();
            model_internal::dependentsOnMap["location"] = new Array();
            model_internal::dependentsOnMap["exp_type_id"] = new Array();
            model_internal::dependentsOnMap["customer"] = new Array();
            model_internal::dependentsOnMap["project_code_id"] = new Array();
            model_internal::dependentsOnMap["tax3"] = new Array();
            model_internal::dependentsOnMap["billable"] = new Array();
            model_internal::dependentsOnMap["amount"] = new Array();
            model_internal::dependentsOnMap["bill_paid"] = new Array();
            model_internal::dependentsOnMap["split_flag"] = new Array();
            model_internal::dependentsOnMap["user_id"] = new Array();
            model_internal::dependentsOnMap["additional_tax"] = new Array();
            model_internal::dependentsOnMap["vendor"] = new Array();
            model_internal::dependentsOnMap["modify_date"] = new Array();
            model_internal::dependentsOnMap["category_id"] = new Array();
            model_internal::dependentsOnMap["vendor_id"] = new Array();
            model_internal::dependentsOnMap["tax_claim"] = new Array();
            model_internal::dependentsOnMap["location_id"] = new Array();
            model_internal::dependentsOnMap["folder"] = new Array();
            model_internal::dependentsOnMap["tax_catagory"] = new Array();
            model_internal::dependentsOnMap["folder_id"] = new Array();
            model_internal::dependentsOnMap["category"] = new Array();
            model_internal::dependentsOnMap["company_paid"] = new Array();
            model_internal::dependentsOnMap["isSelected"] = new Array();
            model_internal::dependentsOnMap["tran_date"] = new Array();
            model_internal::dependentsOnMap["entry_date"] = new Array();
            model_internal::dependentsOnMap["invoice_no"] = new Array();
            model_internal::dependentsOnMap["user"] = new Array();
            model_internal::dependentsOnMap["payment_type"] = new Array();
            model_internal::dependentsOnMap["customer_id"] = new Array();
            model_internal::dependentsOnMap["payment_type_id"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object()
        }

        model_internal::_instance = value;
        model_internal::_folderdValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFolderd);
        model_internal::_folderdValidator.required = true;
        model_internal::_folderdValidator.requiredFieldError = "folderd is required";
        //model_internal::_folderdValidator.source = model_internal::_instance;
        //model_internal::_folderdValidator.property = "folderd";
        model_internal::_catagory_idValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCatagory_id);
        model_internal::_catagory_idValidator.required = true;
        model_internal::_catagory_idValidator.requiredFieldError = "catagory_id is required";
        //model_internal::_catagory_idValidator.source = model_internal::_instance;
        //model_internal::_catagory_idValidator.property = "catagory_id";
        model_internal::_catagoryValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCatagory);
        model_internal::_catagoryValidator.required = true;
        model_internal::_catagoryValidator.requiredFieldError = "catagory is required";
        //model_internal::_catagoryValidator.source = model_internal::_instance;
        //model_internal::_catagoryValidator.property = "catagory";
        model_internal::_locationValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForLocation);
        model_internal::_locationValidator.required = true;
        model_internal::_locationValidator.requiredFieldError = "location is required";
        //model_internal::_locationValidator.source = model_internal::_instance;
        //model_internal::_locationValidator.property = "location";
        model_internal::_customerValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCustomer);
        model_internal::_customerValidator.required = true;
        model_internal::_customerValidator.requiredFieldError = "customer is required";
        //model_internal::_customerValidator.source = model_internal::_instance;
        //model_internal::_customerValidator.property = "customer";
        model_internal::_vendorValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForVendor);
        model_internal::_vendorValidator.required = true;
        model_internal::_vendorValidator.requiredFieldError = "vendor is required";
        //model_internal::_vendorValidator.source = model_internal::_instance;
        //model_internal::_vendorValidator.property = "vendor";
        model_internal::_modify_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForModify_date);
        model_internal::_modify_dateValidator.required = true;
        model_internal::_modify_dateValidator.requiredFieldError = "modify_date is required";
        //model_internal::_modify_dateValidator.source = model_internal::_instance;
        //model_internal::_modify_dateValidator.property = "modify_date";
        model_internal::_folderValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFolder);
        model_internal::_folderValidator.required = true;
        model_internal::_folderValidator.requiredFieldError = "folder is required";
        //model_internal::_folderValidator.source = model_internal::_instance;
        //model_internal::_folderValidator.property = "folder";
        model_internal::_categoryValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCategory);
        model_internal::_categoryValidator.required = true;
        model_internal::_categoryValidator.requiredFieldError = "category is required";
        //model_internal::_categoryValidator.source = model_internal::_instance;
        //model_internal::_categoryValidator.property = "category";
        model_internal::_tran_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForTran_date);
        model_internal::_tran_dateValidator.required = true;
        model_internal::_tran_dateValidator.requiredFieldError = "tran_date is required";
        //model_internal::_tran_dateValidator.source = model_internal::_instance;
        //model_internal::_tran_dateValidator.property = "tran_date";
        model_internal::_entry_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEntry_date);
        model_internal::_entry_dateValidator.required = true;
        model_internal::_entry_dateValidator.requiredFieldError = "entry_date is required";
        //model_internal::_entry_dateValidator.source = model_internal::_instance;
        //model_internal::_entry_dateValidator.property = "entry_date";
        model_internal::_userValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUser);
        model_internal::_userValidator.required = true;
        model_internal::_userValidator.requiredFieldError = "user is required";
        //model_internal::_userValidator.source = model_internal::_instance;
        //model_internal::_userValidator.property = "user";
        model_internal::_payment_typeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPayment_type);
        model_internal::_payment_typeValidator.required = true;
        model_internal::_payment_typeValidator.requiredFieldError = "payment_type is required";
        //model_internal::_payment_typeValidator.source = model_internal::_instance;
        //model_internal::_payment_typeValidator.property = "payment_type";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::dataProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity VOInvoiceMaster");  
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity VOInvoiceMaster");  

        return model_internal::collectionBaseMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VOInvoiceMaster");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::dataProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a data property of entity VOInvoiceMaster");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VOInvoiceMaster");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isFolderdAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCatagory_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCatagoryAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isReturn_flagAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTax2Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTax1Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLocationAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isExp_type_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCustomerAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isProject_code_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTax3Available():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isBillableAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isAmountAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isBill_paidAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSplit_flagAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUser_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isAdditional_taxAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isVendorAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isModify_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCategory_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isVendor_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTax_claimAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isLocation_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFolderAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTax_catagoryAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFolder_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCategoryAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCompany_paidAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIsSelectedAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTran_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEntry_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isInvoice_noAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUserAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPayment_typeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCustomer_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPayment_type_idAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnFolderd():void
    {
        if (model_internal::_folderdIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFolderd = null;
            model_internal::calculateFolderdIsValid();
        }
    }
    public function invalidateDependentOnCatagory_id():void
    {
        if (model_internal::_catagory_idIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCatagory_id = null;
            model_internal::calculateCatagory_idIsValid();
        }
    }
    public function invalidateDependentOnCatagory():void
    {
        if (model_internal::_catagoryIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCatagory = null;
            model_internal::calculateCatagoryIsValid();
        }
    }
    public function invalidateDependentOnLocation():void
    {
        if (model_internal::_locationIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfLocation = null;
            model_internal::calculateLocationIsValid();
        }
    }
    public function invalidateDependentOnCustomer():void
    {
        if (model_internal::_customerIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCustomer = null;
            model_internal::calculateCustomerIsValid();
        }
    }
    public function invalidateDependentOnVendor():void
    {
        if (model_internal::_vendorIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfVendor = null;
            model_internal::calculateVendorIsValid();
        }
    }
    public function invalidateDependentOnModify_date():void
    {
        if (model_internal::_modify_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfModify_date = null;
            model_internal::calculateModify_dateIsValid();
        }
    }
    public function invalidateDependentOnFolder():void
    {
        if (model_internal::_folderIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFolder = null;
            model_internal::calculateFolderIsValid();
        }
    }
    public function invalidateDependentOnCategory():void
    {
        if (model_internal::_categoryIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCategory = null;
            model_internal::calculateCategoryIsValid();
        }
    }
    public function invalidateDependentOnTran_date():void
    {
        if (model_internal::_tran_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfTran_date = null;
            model_internal::calculateTran_dateIsValid();
        }
    }
    public function invalidateDependentOnEntry_date():void
    {
        if (model_internal::_entry_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEntry_date = null;
            model_internal::calculateEntry_dateIsValid();
        }
    }
    public function invalidateDependentOnUser():void
    {
        if (model_internal::_userIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUser = null;
            model_internal::calculateUserIsValid();
        }
    }
    public function invalidateDependentOnPayment_type():void
    {
        if (model_internal::_payment_typeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPayment_type = null;
            model_internal::calculatePayment_typeIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get folderdStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get folderdValidator() : StyleValidator
    {
        return model_internal::_folderdValidator;
    }

    model_internal function set _folderdIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_folderdIsValid;         
        if (oldValue !== value)
        {
            model_internal::_folderdIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "folderdIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get folderdIsValid():Boolean
    {
        if (!model_internal::_folderdIsValidCacheInitialized)
        {
            model_internal::calculateFolderdIsValid();
        }

        return model_internal::_folderdIsValid;
    }

    model_internal function calculateFolderdIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_folderdValidator.validate(model_internal::_instance.folderd)
        model_internal::_folderdIsValid_der = (valRes.results == null);
        model_internal::_folderdIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::folderdValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::folderdValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get folderdValidationFailureMessages():Array
    {
        if (model_internal::_folderdValidationFailureMessages == null)
            model_internal::calculateFolderdIsValid();

        return _folderdValidationFailureMessages;
    }

    model_internal function set folderdValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_folderdValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_folderdValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "folderdValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get catagory_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get catagory_idValidator() : StyleValidator
    {
        return model_internal::_catagory_idValidator;
    }

    model_internal function set _catagory_idIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_catagory_idIsValid;         
        if (oldValue !== value)
        {
            model_internal::_catagory_idIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "catagory_idIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get catagory_idIsValid():Boolean
    {
        if (!model_internal::_catagory_idIsValidCacheInitialized)
        {
            model_internal::calculateCatagory_idIsValid();
        }

        return model_internal::_catagory_idIsValid;
    }

    model_internal function calculateCatagory_idIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_catagory_idValidator.validate(model_internal::_instance.catagory_id)
        model_internal::_catagory_idIsValid_der = (valRes.results == null);
        model_internal::_catagory_idIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::catagory_idValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::catagory_idValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get catagory_idValidationFailureMessages():Array
    {
        if (model_internal::_catagory_idValidationFailureMessages == null)
            model_internal::calculateCatagory_idIsValid();

        return _catagory_idValidationFailureMessages;
    }

    model_internal function set catagory_idValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_catagory_idValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_catagory_idValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "catagory_idValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get catagoryStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get catagoryValidator() : StyleValidator
    {
        return model_internal::_catagoryValidator;
    }

    model_internal function set _catagoryIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_catagoryIsValid;         
        if (oldValue !== value)
        {
            model_internal::_catagoryIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "catagoryIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get catagoryIsValid():Boolean
    {
        if (!model_internal::_catagoryIsValidCacheInitialized)
        {
            model_internal::calculateCatagoryIsValid();
        }

        return model_internal::_catagoryIsValid;
    }

    model_internal function calculateCatagoryIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_catagoryValidator.validate(model_internal::_instance.catagory)
        model_internal::_catagoryIsValid_der = (valRes.results == null);
        model_internal::_catagoryIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::catagoryValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::catagoryValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get catagoryValidationFailureMessages():Array
    {
        if (model_internal::_catagoryValidationFailureMessages == null)
            model_internal::calculateCatagoryIsValid();

        return _catagoryValidationFailureMessages;
    }

    model_internal function set catagoryValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_catagoryValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_catagoryValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "catagoryValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get return_flagStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get tax2Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get tax1Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get locationStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get locationValidator() : StyleValidator
    {
        return model_internal::_locationValidator;
    }

    model_internal function set _locationIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_locationIsValid;         
        if (oldValue !== value)
        {
            model_internal::_locationIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "locationIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get locationIsValid():Boolean
    {
        if (!model_internal::_locationIsValidCacheInitialized)
        {
            model_internal::calculateLocationIsValid();
        }

        return model_internal::_locationIsValid;
    }

    model_internal function calculateLocationIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_locationValidator.validate(model_internal::_instance.location)
        model_internal::_locationIsValid_der = (valRes.results == null);
        model_internal::_locationIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::locationValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::locationValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get locationValidationFailureMessages():Array
    {
        if (model_internal::_locationValidationFailureMessages == null)
            model_internal::calculateLocationIsValid();

        return _locationValidationFailureMessages;
    }

    model_internal function set locationValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_locationValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_locationValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "locationValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get exp_type_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get customerStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get customerValidator() : StyleValidator
    {
        return model_internal::_customerValidator;
    }

    model_internal function set _customerIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_customerIsValid;         
        if (oldValue !== value)
        {
            model_internal::_customerIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "customerIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get customerIsValid():Boolean
    {
        if (!model_internal::_customerIsValidCacheInitialized)
        {
            model_internal::calculateCustomerIsValid();
        }

        return model_internal::_customerIsValid;
    }

    model_internal function calculateCustomerIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_customerValidator.validate(model_internal::_instance.customer)
        model_internal::_customerIsValid_der = (valRes.results == null);
        model_internal::_customerIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::customerValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::customerValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get customerValidationFailureMessages():Array
    {
        if (model_internal::_customerValidationFailureMessages == null)
            model_internal::calculateCustomerIsValid();

        return _customerValidationFailureMessages;
    }

    model_internal function set customerValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_customerValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_customerValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "customerValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get project_code_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get tax3Style():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get billableStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get amountStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get bill_paidStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get split_flagStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get user_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get additional_taxStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get vendorStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get vendorValidator() : StyleValidator
    {
        return model_internal::_vendorValidator;
    }

    model_internal function set _vendorIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_vendorIsValid;         
        if (oldValue !== value)
        {
            model_internal::_vendorIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vendorIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get vendorIsValid():Boolean
    {
        if (!model_internal::_vendorIsValidCacheInitialized)
        {
            model_internal::calculateVendorIsValid();
        }

        return model_internal::_vendorIsValid;
    }

    model_internal function calculateVendorIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_vendorValidator.validate(model_internal::_instance.vendor)
        model_internal::_vendorIsValid_der = (valRes.results == null);
        model_internal::_vendorIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::vendorValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::vendorValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get vendorValidationFailureMessages():Array
    {
        if (model_internal::_vendorValidationFailureMessages == null)
            model_internal::calculateVendorIsValid();

        return _vendorValidationFailureMessages;
    }

    model_internal function set vendorValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_vendorValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_vendorValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vendorValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get modify_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get modify_dateValidator() : StyleValidator
    {
        return model_internal::_modify_dateValidator;
    }

    model_internal function set _modify_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_modify_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_modify_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "modify_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get modify_dateIsValid():Boolean
    {
        if (!model_internal::_modify_dateIsValidCacheInitialized)
        {
            model_internal::calculateModify_dateIsValid();
        }

        return model_internal::_modify_dateIsValid;
    }

    model_internal function calculateModify_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_modify_dateValidator.validate(model_internal::_instance.modify_date)
        model_internal::_modify_dateIsValid_der = (valRes.results == null);
        model_internal::_modify_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::modify_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::modify_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get modify_dateValidationFailureMessages():Array
    {
        if (model_internal::_modify_dateValidationFailureMessages == null)
            model_internal::calculateModify_dateIsValid();

        return _modify_dateValidationFailureMessages;
    }

    model_internal function set modify_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_modify_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_modify_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "modify_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get category_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get vendor_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get tax_claimStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get location_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get folderStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get folderValidator() : StyleValidator
    {
        return model_internal::_folderValidator;
    }

    model_internal function set _folderIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_folderIsValid;         
        if (oldValue !== value)
        {
            model_internal::_folderIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "folderIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get folderIsValid():Boolean
    {
        if (!model_internal::_folderIsValidCacheInitialized)
        {
            model_internal::calculateFolderIsValid();
        }

        return model_internal::_folderIsValid;
    }

    model_internal function calculateFolderIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_folderValidator.validate(model_internal::_instance.folder)
        model_internal::_folderIsValid_der = (valRes.results == null);
        model_internal::_folderIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::folderValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::folderValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get folderValidationFailureMessages():Array
    {
        if (model_internal::_folderValidationFailureMessages == null)
            model_internal::calculateFolderIsValid();

        return _folderValidationFailureMessages;
    }

    model_internal function set folderValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_folderValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_folderValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "folderValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get tax_catagoryStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get folder_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get categoryStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get categoryValidator() : StyleValidator
    {
        return model_internal::_categoryValidator;
    }

    model_internal function set _categoryIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_categoryIsValid;         
        if (oldValue !== value)
        {
            model_internal::_categoryIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "categoryIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get categoryIsValid():Boolean
    {
        if (!model_internal::_categoryIsValidCacheInitialized)
        {
            model_internal::calculateCategoryIsValid();
        }

        return model_internal::_categoryIsValid;
    }

    model_internal function calculateCategoryIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_categoryValidator.validate(model_internal::_instance.category)
        model_internal::_categoryIsValid_der = (valRes.results == null);
        model_internal::_categoryIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::categoryValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::categoryValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get categoryValidationFailureMessages():Array
    {
        if (model_internal::_categoryValidationFailureMessages == null)
            model_internal::calculateCategoryIsValid();

        return _categoryValidationFailureMessages;
    }

    model_internal function set categoryValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_categoryValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_categoryValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "categoryValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get company_paidStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get isSelectedStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get tran_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get tran_dateValidator() : StyleValidator
    {
        return model_internal::_tran_dateValidator;
    }

    model_internal function set _tran_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_tran_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_tran_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tran_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get tran_dateIsValid():Boolean
    {
        if (!model_internal::_tran_dateIsValidCacheInitialized)
        {
            model_internal::calculateTran_dateIsValid();
        }

        return model_internal::_tran_dateIsValid;
    }

    model_internal function calculateTran_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_tran_dateValidator.validate(model_internal::_instance.tran_date)
        model_internal::_tran_dateIsValid_der = (valRes.results == null);
        model_internal::_tran_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::tran_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::tran_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get tran_dateValidationFailureMessages():Array
    {
        if (model_internal::_tran_dateValidationFailureMessages == null)
            model_internal::calculateTran_dateIsValid();

        return _tran_dateValidationFailureMessages;
    }

    model_internal function set tran_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_tran_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_tran_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tran_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get entry_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get entry_dateValidator() : StyleValidator
    {
        return model_internal::_entry_dateValidator;
    }

    model_internal function set _entry_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_entry_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_entry_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "entry_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get entry_dateIsValid():Boolean
    {
        if (!model_internal::_entry_dateIsValidCacheInitialized)
        {
            model_internal::calculateEntry_dateIsValid();
        }

        return model_internal::_entry_dateIsValid;
    }

    model_internal function calculateEntry_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_entry_dateValidator.validate(model_internal::_instance.entry_date)
        model_internal::_entry_dateIsValid_der = (valRes.results == null);
        model_internal::_entry_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::entry_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::entry_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get entry_dateValidationFailureMessages():Array
    {
        if (model_internal::_entry_dateValidationFailureMessages == null)
            model_internal::calculateEntry_dateIsValid();

        return _entry_dateValidationFailureMessages;
    }

    model_internal function set entry_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_entry_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_entry_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "entry_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get invoice_noStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get userStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get userValidator() : StyleValidator
    {
        return model_internal::_userValidator;
    }

    model_internal function set _userIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_userIsValid;         
        if (oldValue !== value)
        {
            model_internal::_userIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "userIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get userIsValid():Boolean
    {
        if (!model_internal::_userIsValidCacheInitialized)
        {
            model_internal::calculateUserIsValid();
        }

        return model_internal::_userIsValid;
    }

    model_internal function calculateUserIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_userValidator.validate(model_internal::_instance.user)
        model_internal::_userIsValid_der = (valRes.results == null);
        model_internal::_userIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::userValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::userValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get userValidationFailureMessages():Array
    {
        if (model_internal::_userValidationFailureMessages == null)
            model_internal::calculateUserIsValid();

        return _userValidationFailureMessages;
    }

    model_internal function set userValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_userValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_userValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "userValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get payment_typeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get payment_typeValidator() : StyleValidator
    {
        return model_internal::_payment_typeValidator;
    }

    model_internal function set _payment_typeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_payment_typeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_payment_typeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "payment_typeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get payment_typeIsValid():Boolean
    {
        if (!model_internal::_payment_typeIsValidCacheInitialized)
        {
            model_internal::calculatePayment_typeIsValid();
        }

        return model_internal::_payment_typeIsValid;
    }

    model_internal function calculatePayment_typeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_payment_typeValidator.validate(model_internal::_instance.payment_type)
        model_internal::_payment_typeIsValid_der = (valRes.results == null);
        model_internal::_payment_typeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::payment_typeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::payment_typeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get payment_typeValidationFailureMessages():Array
    {
        if (model_internal::_payment_typeValidationFailureMessages == null)
            model_internal::calculatePayment_typeIsValid();

        return _payment_typeValidationFailureMessages;
    }

    model_internal function set payment_typeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_payment_typeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_payment_typeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "payment_typeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get customer_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get payment_type_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("folderd"):
            {
                return folderdValidationFailureMessages;
            }
            case("catagory_id"):
            {
                return catagory_idValidationFailureMessages;
            }
            case("catagory"):
            {
                return catagoryValidationFailureMessages;
            }
            case("location"):
            {
                return locationValidationFailureMessages;
            }
            case("customer"):
            {
                return customerValidationFailureMessages;
            }
            case("vendor"):
            {
                return vendorValidationFailureMessages;
            }
            case("modify_date"):
            {
                return modify_dateValidationFailureMessages;
            }
            case("folder"):
            {
                return folderValidationFailureMessages;
            }
            case("category"):
            {
                return categoryValidationFailureMessages;
            }
            case("tran_date"):
            {
                return tran_dateValidationFailureMessages;
            }
            case("entry_date"):
            {
                return entry_dateValidationFailureMessages;
            }
            case("user"):
            {
                return userValidationFailureMessages;
            }
            case("payment_type"):
            {
                return payment_typeValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
